package com.mxf.code.factory;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController(value = "/")
public class TestController {
	@Autowired
	private TestFactory testFactory;
	
	@RequestMapping(value = "msg/{key}",method = RequestMethod.GET)
	public String getMsg(@PathVariable("key")String key) {
		// 把实际
		TestInterface test = testFactory.geTestInterface(key);
		return test.getMsg("test test");
	}
}
